// 任务环节
export const TaskStep = {
    START: 1,
    AUDIT: 2,
    EXECUTE: 3,
    ACCEPT: 5,
    SCORE: 7,
    RECKON: 6
};

// 任务环节列表 数据字典
export const TaskStepList = [
    {
        text: '发起',
        value: TaskStep.START
    },
    {
        text: '审核',
        value: TaskStep.AUDIT
    },
    {
        text: '执行',
        value: TaskStep.EXECUTE
    },
    {
        text: '验收',
        value: TaskStep.ACCEPT
    },
    {
        text: '评分',
        value: TaskStep.SCORE
    },
    {
        text: '估算',
        value: TaskStep.RECKON
    }
];
// 任务环节  -- 表格可过滤选项（没有评分和估算），因后端在列表页面无法根据评分、估算的状态条件查询。
export const TaskStepListFilter = TaskStepList.slice(0, 4);

// 任务优先级
export const TaskPriority = {
    EMERGENT: 1,
    HIGH: 2,
    MIDDLE: 3,
    LOW: 4
};

// 任务优先级列表
export const TaskPriorityList = [
    {
        text: '紧急',
        value: TaskPriority.EMERGENT
    },
    {
        text: '高',
        value: TaskPriority.HIGH
    },
    {
        text: '中',
        value: TaskPriority.MIDDLE
    },
    {
        text: '低',
        value: TaskPriority.LOW
    }
];

// 任务状态
export const TaskStatus = {
    READY: 1,
    ONGOING: 2,
    FINISH: 3,
    PAUSE: 4,
    CANCEL: 5
};

// 任务状态列表
export const TaskStatusList = [
    {
        text: '待开始',
        value: TaskStatus.READY
    },
    {
        text: '进行中',
        value: TaskStatus.ONGOING
    },
    {
        text: '已完成',
        value: TaskStatus.FINISH
    },
    {
        text: '已暂停',
        value: TaskStatus.PAUSE
    },
    {
        text: '已取消',
        value: TaskStatus.CANCEL
    }
];

// 列表操作
export const TaskAction = {
    NEW: 1,
    PRESS: 2,
    PAUSE: 3,
    CONTINUE: 4,
    CANCEL: 5,
    DOING: 6,
    COPY: 7,
    PROGRESS: 8,
    DONE: 9,
    RESTART: 10,
    CHANGE: 11,
    BACK: 12,
    RECHECK: 13,
    TRANSFER: 14,
    DELAY: 15,
    RECKON: 16,
    PASS: 17,
    REFUSE: 18,
    ESTIMATION: 19,
    RESUME_ESTIMATION: 20,
    LAUNCH_ESTIMATION: 21,
    MOVE_NONEED: 22,
    MOVE_STARTESTIMATE: 23,
    SCORE: 24,
    RESCORE: 25,
    ABANDON_SCORE: 26,
    SCORE_START: 27,
    MOVE_TO_NO_SCORE: 28,
    MOVE_TO_BE_SCORE: 29
};

export const ActionObj = {
    [TaskAction.NEW]: '新增子任务',
    [TaskAction.PRESS]: '催办',
    [TaskAction.PAUSE]: '暂停',
    [TaskAction.CONTINUE]: '继续执行',
    [TaskAction.CANCEL]: '取消',
    [TaskAction.DOING]: '转进行中',
    [TaskAction.COPY]: '复制任务',
    [TaskAction.PROGRESS]: '填写进度',
    [TaskAction.DONE]: '转已完成',
    [TaskAction.RESTART]: '重新发起',
    [TaskAction.CHANGE]: '变更',
    [TaskAction.BACK]: '退回',
    [TaskAction.RECHECK]: '重评申请',
    [TaskAction.SCORE]: '评分',
    [TaskAction.RESCORE]: '重评',
    [TaskAction.ABANDON_SCORE]: '放弃评分',
    [TaskAction.SCORE_START]: '发起评分',
    [TaskAction.MOVE_TO_NO_SCORE]: '移入无需评分',
    [TaskAction.MOVE_TO_BE_SCORE]: '移回待发起',
    [TaskAction.TRANSFER]: '转派',
    [TaskAction.DELAY]: '延期',
    [TaskAction.RECKON]: '重估申请',
    [TaskAction.PASS]: '通过',
    [TaskAction.REFUSE]: '不通过',
    [TaskAction.ESTIMATION]: '估算',
    [TaskAction.RESUME_ESTIMATION]: '重估',
    [TaskAction.LAUNCH_ESTIMATION]: '发起估算',
    [TaskAction.MOVE_NONEED]: '移入无需估算',
    [TaskAction.MOVE_STARTESTIMATE]: '移回待发起'
};

export const TaskAcceptanceResultList = [
    {
        text: '通过',
        value: 1
    },
    {
        text: '不通过',
        value: 2
    }
];
// 未操作  通过  不通过
export const TaskAuditType = { INIT: 0, PASS: 1, REFUSE: 2 };
export const TaskAuditResult = [
    {
        text: '通过',
        value: TaskAuditType.PASS
    },
    {
        text: '不通过',
        value: TaskAuditType.REFUSE
    }
];

// 任务操作
export const TaskOperateType = {
    START: 1, // 发起
    CHANGE: 2, // 变更
    AUDIT_PASS: 3, // 审核通过
    AUDIT_REFUSE: 4, // 审核不通过
    TURN_DOING: 5, // 转进行中
    WRITE_PROGRESS: 6, // 填写进度
    PRESS: 7, // 催办
    CANCEL: 8, // 取消
    PAUSE: 9, // 暂停
    CONTINUE: 10, // 继续执行
    DELAY: 11, // 延期
    RESTART: 12, // 重新发起
    TURN_FINISH: 13, // 转已完成
    ACCEPTANCE_PASS: 14, // 验收通过
    ACCEPTANCE_FAILED: 15, // 验收不通过
    TRANSFER: 16, // 转派
    BACK: 17, // 退回
    LAUNCH_SCORE: 18, // 发起评分
    SCORE: 19, // 评分
    LAUNCH_ESTIMATION: 20, // 发起估算
    ESTIMATION: 21, // 估算
    RECHECK: 22, // 重评
    RESUME_ESTIMATION: 23, // 重估
    ABANDON_SCORE: 24, // 放弃评分
    AUTO_SCORE: 25, // 自动评分
    LAUNCH_RESUME_ESTIMATION_APPLY: 26, // 发起重估申请
    RECHECK_APPLY: 27 // 重评申请
};

// 任务操作 审核列表显示项
export const TaskOperateTypeList = [
    {
        text: '发起',
        value: TaskOperateType.START
    },
    {
        text: '变更',
        value: TaskOperateType.CHANGE
    },
    {
        text: '取消',
        value: TaskOperateType.CANCEL
    },
    {
        text: '暂停',
        value: TaskOperateType.PAUSE
    },
    {
        text: '延期',
        value: TaskOperateType.DELAY
    },
    {
        text: '重评申请',
        value: TaskOperateType.RECHECK_APPLY
    },
    {
        text: '重估申请',
        value: TaskOperateType.LAUNCH_RESUME_ESTIMATION_APPLY
    },
    {
        text: '重新发起',
        value: TaskOperateType.RESTART
    }
];

export const PageFromType = {
    EXECUTE: 1,
    AUDIT: 2,
    ACCEPT: 3,
    START: 4,
    PARTICIPATE: 5,
    SCORE: 6,
    SCORE_START: 7,
    NO_SCORE: 8,
    RECKON: 9,
    RECKON_START: 10,
    RECKON_NODEEN: 11
};

//  周期任务取消类型
export const CycleTaskCancelType = {
    CURRENT: 1,
    ALL: 2
};

//  周期任务取消类型
export const CycleTaskCancelTypeList = [
    {
        text: '取消当前任务',
        value: CycleTaskCancelType.CURRENT
    },
    {
        text: '取消所有任务',
        value: CycleTaskCancelType.ALL
    }
];

// 详情页Tab内页操作项
export const ActionType = {
    START: '发起',
    CHANGE: '变更',
    APPROVED: '审核通过',
    UNAPPROVED: '审核不通过',
    TURN_DOING: '转进行中',
    FILL_PROGRESS: '填写进度',
    PRESS: '催办',
    CANCEL: '取消',
    PAUSE: '暂停',
    CONTINUE: '继续执行',
    DELAY: '延期',
    RESTART: '重新发起',
    TURN_DONE: '转已完成',
    PASSED: '验收通过',
    FAIL: '验收不通过',
    TRANSFER: '转派',
    BACK: '退回',
    START_SCORE: '发起评分',
    SCORE: '评分',
    START_RECKON: '发起估算',
    RECKON: '估算',
    RECHECK: '重评',
    RE_RECKON: '重估'
};
// 延期类型
export const TaskDelayType = {
    PAUSE: 1,
    PLAN_NOT_EXACT: 2,
    INSERTED: 3,
    TASK_CHANGE: 4,
    UNDERSTANDING_BIAS: 5,
    OTHERWISE: 99
};
// 延期类型
export const TaskDelayTypeList = [
    {
        text: '任务暂停导致',
        value: TaskDelayType.PAUSE
    },
    {
        text: '预估工时不准',
        value: TaskDelayType.PLAN_NOT_EXACT
    },
    {
        text: '其他优先级插入',
        value: TaskDelayType.INSERTED
    },
    {
        text: '任务变更',
        value: TaskDelayType.TASK_CHANGE
    },
    {
        text: '任务理解偏差',
        value: TaskDelayType.UNDERSTANDING_BIAS
    },
    {
        text: '其他',
        value: TaskDelayType.OTHERWISE
    }
];

//  催办类型
export const TaskPressType = {
    SYSTEM: 1,
    CUSTOM: 2
};

//  周期任务取消类型
export const TaskPressTypeList = [
    {
        text: '按系统统一规则',
        value: TaskPressType.SYSTEM
    },
    {
        text: '自定义',
        value: TaskPressType.CUSTOM
    }
];
